/*
 * @Author: pgz285 1272160626@qq.com
 * @Date: 2022-09-08 12:11:01
 * @LastEditors: pgz285 1272160626@qq.com
 * @LastEditTime: 2022-09-08 12:31:02
 * @FilePath: /element-admin/src/router/index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/components/index.vue'
import Login from '@/views/Login.vue'

import QuartzCal from '@/views/quartz/QuartzCal.vue'
import SysDictsView from '@/views/sys/SysDicts.vue'
import PrintSettingView from '@/views/sys/PrintSetting.vue'

import IotAdminView from "@/views/mqtt/Iot.vue";
import HealthyCateringMatchingView from "@/views/hcm/HealthyCMV.vue"
import MemberWeightView from "@/views/hcm/MemberWeight.vue"
import WebSubjectView from "@/views/hcm/WebSubject.vue"
import WebProjectCampView from "@/views/hcm/WebProjectCamp.vue"

import HealthyFoodCatalogsView from "@/views/hcm/FoodCatalog.vue"
import FoodCalDayMapView from "@/views/hcm/FoodCalDayMap.vue"
import FoodCalDinnerMapView from "@/views/hcm/FoodCalDinnerMap.vue"

import ArticalDesFormView from "@/views/purm/ArticalDesForm.vue"
import VdesFormView from "@/views/purm/VdesFormV.vue"
import PurmFreelifeView from "@/views/purm/lfreeV.vue";
import PurmFreelifeVDBView from "@/views/purm/lfreeVDB.vue";
import PurmEvergreenWealthIncomeView from "@/views/purm/EgiV.vue"
import PurmMultiCurrencyPlanView from "@/views/purm/EgcV.vue"
import MembersView from "@/views/members/Members.vue"
import MemberLevelView from "@/views/members/MemberLevel.vue"
import MemberRewardStrategyView from "@/views/members/MemberRewardStrategy.vue"
import MemberPointHistoryView from "@/views/members/MemberPointHistory.vue"
import CustDinnerMapView from "@/views/hcm/CustDinnerMap.vue"
import SupplyPrintingView from "@/views/hcm/SupplyPrinting.vue";

Vue.use(Router)

const routes = [
    {
        path: '/',
        redirect: '/index'
    },
    {
        path: '/index',
        component: Index,
    },
    {
        path: '/login',
        component: Login
    },

    {
        path: '/SysDictsView',
        component: SysDictsView
    },
    {
        path: 'PrintSettingView',
        component: PrintSettingView
    },
    {
        path: '/MembersView',
        component: MembersView,
        meta: {
            keepalive: false,
            title: "火商云数据会员中心",
            keyword: "火商云数据会员中心",
            description: "火商云数据会员中心"
        }
    },
    {
        path: '/MemberLevelView',
        component: MemberLevelView,
        meta: {
            keepalive: false,
            title: "火商云数据会员等级积分",
            keyword: "火商云数据会员等级积分",
            description: "火商云数据会员等级积分"
        }
    },
    {
        path: '/MemberRewardStrategyView',
        component: MemberRewardStrategyView,
        meta: {
            keepalive: false,
            title: "火商云数据积分奖励策略",
            keyword: "火商云数据积分奖励策略",
            description: "火商云数据积分奖励策略"
        }
    },
    {
        path: '/MemberPointHistoryView',
        component: MemberPointHistoryView,
        meta: {
            keepalive: false,
            title: "火商云数据会员积分历史记录",
            keyword: "火商云数据会员积分历史记录",
            description: "火商云数据会员积分历史记录"
        }
    },
    {
        path: '/FoodCalDayMapView',
        component: FoodCalDayMapView,
        meta: {
            keepalive: false,
            title: "火商云数据会员积分历史记录",
            keyword: "火商云数据会员积分历史记录",
            description: "食材每日统计计算1"
        }
    },
    {
        path: '/FoodCalDinnerMapView',
        component: FoodCalDinnerMapView,
        meta: {
            keepalive: false,
            title: "火商云数据会员热量计算记录",
            keyword: "火商云数据会员热量计算记录",
            description: "火商云数据会员热量计算记录"
        }
    },
    {
        path: '/CustDinnerMapView',
        component: CustDinnerMapView,
        meta: {
            keepalive: false,
            title: "火商云数据自定义菜谱记录",
            keyword: "火商云数据自定义菜谱记录",
            description: "火商云数据自定义菜谱记录"
        }
    },
    {
        path: '/SupplyPrintingView',
        component: SupplyPrintingView,
        meta: {
            keepalive: false,
            title: "火商云数据自定义菜谱记录",
            keyword: "火商云数据自定义菜谱记录",
            description: "云打印数据补充"
        }
    },
    {
        path: '/QuartzCal',
        component: QuartzCal
    },
    {
        path: '/IotAdminView',
        component: IotAdminView,
        meta: {
            keepalive: false,
            title: "火商云数据聚合Iot物联网",
            keyword: "火商云数据聚合Iot物联网",
            description: "火商云数据聚合Iot物联网"
        }
    },
    {
        path: '/PurmFreelive',
        component: PurmFreelifeView,
        meta: {
            keepalive: false,
            title: "火商云数据聚合平台",
            keyword: "火商云数据聚合平台",
            description: "火商云数据聚合平台"
        }
    },
    {
        path: '/PurmFreelifeVDB',
        component: PurmFreelifeVDBView,
        meta: {
            keepalive: false,
            title: "火商云数据聚合平台",
            keyword: "火商云数据聚合平台",
            description: "火商云数据聚合平台"
        }
    },
    {
        path: '/PurmEvergreenWealthIncomeView',
        component: PurmEvergreenWealthIncomeView,
        meta: {
            keepalive: false,
            title: "火商云数据聚合平台",
            keyword: "火商云数据聚合平台",
            description: "火商云数据聚合平台"
        }
    },
    {
        path: 'PurmMultiCurrencyPlanView',
        component: PurmMultiCurrencyPlanView,
        meta: {
            keepalive: false,
            title: "火商云数据聚合平台",
            keyword: "火商云数据聚合平台",
            description: "火商云数据聚合平台"
        }
    },
    {
        path: 'ArticalDesFormView',
        component: ArticalDesFormView,
        meta: {
            keepalive: false,
            title: "火商云数据聚合平台",
            keyword: "表单组合设计",
            description: "表单组合设计"
        }
    },
    {
        path: 'VdesFormView',
        component: VdesFormView,
        meta: {
            keepalive: false,
            title: "火商云数据聚合平台",
            keyword: "表单组合设计",
            description: "表单组合设计"
        }
    },
    // FoodCalDayMap
    {
        path: '/WebSubjectView',
        component: WebSubjectView,
        meta: {
            keepalive: false,
            title: "火商云数据聚合平台",
            keyword: "火商云数据聚合平台",
            description: "HCM站点留言"
        }
    },
    {
        path: '/MemberWeightView',
        component: MemberWeightView,
        meta: {
            keepalive: false,
            title: "火商云数据聚合平台",
            keyword: "火商云数据聚合平台",
            description: "HCM注册会员"
        }
    },
    {
        path: '/HealthyFoodCatalogsView',
        component: HealthyFoodCatalogsView,
        meta: {
            keepalive: false,
            title: "火商云数据聚合平台",
            keyword: "火商云数据聚合平台",
            description: "HCM食材配置"
        }
    },
    {
        path: '/HealthyCateringMatchingView',
        component: HealthyCateringMatchingView,
        meta: {
            keepalive: false,
            title: "火商云数据聚合平台",
            keyword: "火商云数据聚合平台",
            description: "HCM减肥计划"
        }
    },
    {
        path: '/WebProjectCampView',
        component: WebProjectCampView,
        meta: {
            keepalive: false,
            title: "火商云数据聚合平台",
            keyword: "火商云数据聚合平台",
            description: "HCM减肥计划项目"
        }
    },

]
const router = new Router({
    // mode: "hash",
    // base: process.env.BASE_URL,
    base: '/hcm',
    routes
});

router.beforeEach((to, from, next) => {
    if (to.meta.title) {
        document.title = to.meta.title;
        document.description = to.meta.description;
        document.keyword = to.meta.keyword;
    }
    next();
});

export default router
